/**********************************************************************************
 * Code license:  GNU General Public License v3                                   *
 * Main page:     https://code.google.com/p/library-cross-platform/               *
 * Issue tracker: https://code.google.com/p/library-cross-platform/issues/list    *
***********************************************************************************/

package library.ui;

public class TextElement extends Element
{
  protected String  text;
  protected int     WSymbolCount = 30;
  protected int     HSymbolCount = 5;
  protected boolean hScroll      = false;
  protected boolean vScroll      = false;
  
  public TextElement() {
    super(TEXTEDIT_TYPE);
  }

  public TextElement(String str) {
    super(TEXTEDIT_TYPE);
    text = str;
  }

  public void setText(String txt) {
    text = txt;
  }
  
  public String getText() {
    return text;
  }

  public String toString() {
    return text;
  }

  public void setSymbolCountW(int val) {
    WSymbolCount = val;
  }

  public int getSymbolCountW() {
    return WSymbolCount;
  }

  public void setSymbolCountH(int val) {
    HSymbolCount = val;
  }

  public int getSymbolCountH() {
    return HSymbolCount;
  }

  public void setVerticalScrollBar(boolean b) {
    vScroll = b;
  }

  public boolean getVerticalScrollBar() {
    return vScroll;
  }

  public void setHorizontalScrollBar(boolean b) {
    hScroll = b;
  }

  public boolean getHorizontalScrollBar() {
    return hScroll;
  }
}